package com.viettel.pon.adapter;

import com.viettel.pon.Tabs.ReportActivity;
import com.viettel.pon.Tabs.SearchActivity;
import com.viettel.pon.Tabs.SyncActivity;
import com.viettel.pon.Tabs.TimeListActivity;
import com.viettel.pon.Tabs.UpdateVersion;
import com.viettel.pon.Tabs.ViewActivity;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
 
public class TabsPagerAdapter extends FragmentPagerAdapter {

	  
    public TabsPagerAdapter(FragmentManager fm) {
        super(fm);
    }
 
    @Override
    public Fragment getItem(int index) {
 
        switch (index) {
        case 0:
            // Top Rated fragment activity
            return new ViewActivity();
//        case 1:
//            // Games fragment activity
//            return new TimeListActivity();
        case 1:
            // Movies fragment activity
            return new SearchActivity();
        case 2:
            // Movies fragment activity
            return new ReportActivity();
        case 3:
//             Movies fragment activity
            return new SyncActivity();
        case 4:
//             Movies fragment activity
            return new UpdateVersion();
        }
 
        return null;
    }
 
    @Override
    public int getCount() {
        // get item count - equal to number of tabs
        return 5;
    }
 
}